/**
 * title 菜单标题
 * name 路由名称
 * path 路由地址，不填写则不初始化路由
 * component 路由组件地址，不填写则不初始化路由
 * redirect 路由重定向
 * hideInMenu 是否隐藏菜单 默认展示 true
 * showName 配合hideInMenu使用 隐藏后菜单栏展示对应的active
 * child 子路由
 * hasGroup 是否是分组
 * pname 旧saas跳转链接额外参数
 */
let Main = () => import('@/components/main')
export const menu = [
  {
    title: '首页',
    name: 'home',
    path: '/',
    icon: 'home',
    component: Main,
    secondMenuTitle: '首页',
    child: [
      {
        title: '首页',
        name: 'index',
        path: '/',
        component: () => import('@/view/home/index.vue')
      }
    ]
  },
  {
    title: '登录',
    name: 'login',
    path: '/login',
    component: () => import('@/view/login/index.vue'),
    redirect: '/login/signin',
    hideInMenu: true,
    child: [
      {
        title: '登录',
        name: 'signin',
        path: '/login/signin',
        component: () => import('@/view/login/signin.vue')
      },
      {
        title: '注册',
        name: 'signup',
        path: '/login/signup',
        component: () => import('@/view/login/signup.vue')
      }
    ]
  },
  // {
  //   title: '商品',
  //   name: 'goods',
  //   path: '/goods',
  //   icon: 'shopping-cart',
  //   permissions: ['goods_list:view','goods_list:cat','goods_list:submit'],
  //   component: Main,
  //   secondMenuTitle: '商品管理',
  //   redirect: '/goods_list',
  //   child: [
  //     {
  //       title: '选品入库',
  //       name: 'goods_create',
  //       path: '/goods_create',
  //       component: () =>
  //       import('@/view/goods/create.vue')
  //     },
  //     {
  //       title: '选品入库',
  //       name: 'goods_submit',
  //       path: '/goods_submit',
  //       hideInMenu: true,
  //       component: () =>
  //       import('@/view/goods/submit.vue')
  //     },
  //     {
  //       title: '选品入库',
  //       name: 'alibaba_submit',
  //       path: '/alibaba_submit',
  //       hideInMenu: true,
  //       component: () =>
  //       import('@/view/goods/alibaba_submit.vue')
  //     },
  //     {
  //       title: '选品入库',
  //       name: 'jd_submit',
  //       path: '/jd_submit',
  //       hideInMenu: true,
  //       component: () =>
  //       import('@/view/goods/jd_submit.vue')
  //     },
  //     {
  //       title: '编辑商品',
  //       name: 'goods_edit',
  //       path: '/goods_edit',
  //       hideInMenu: true,
  //       component: () =>
  //       import('@/view/goods/edit.vue')
  //     },
  //     {
  //       title: '商品管理',
  //       name: 'goods_list',
  //       path: '/goods_list',
  //       component: () =>
  //       import('@/view/goods/list.vue')
  //     },
  //     {
  //       title: '商品分类',
  //       name: 'goods_cat',
  //       path: '/goods_cat',
  //       component: () =>
  //       import('@/view/goods/cat.vue')
  //     },
  //     {
  //       title: '商品详情',
  //       name: 'goods_detail',
  //       path: '/goods_detail',
  //       hideInMenu: true,
  //       component: () =>
  //       import('@/view/goods/detail.vue')
  //     },
  //   ]
  // },
  // {
  //   title: '订单',
  //   name: 'orders',
  //   path: '/orders',
  //   icon: 'list',
  //   component: Main,
  //   secondMenuTitle: '订单管理',
  //   redirect: '/order_all',
  //   child: [
  //     {
  //       title: '全部订单',
  //       name: 'order_all',
  //       path: '/order_all',
  //       component: () =>
  //         import('@/view/order/all.vue')
  //     },
  //     {
  //       title: '待支付',
  //       name: 'order_pay',
  //       path: '/order_pay',
  //       component: () =>
  //         import('@/view/order/pay.vue')
  //     },
  //     {
  //       title: '待发货',
  //       name: 'order_send',
  //       path: '/order_send',
  //       component: () =>
  //         import('@/view/order/send.vue')
  //     },
  //     {
  //       title: '待收货',
  //       name: 'order_receive',
  //       path: '/order_receive',
  //       component: () =>
  //         import('@/view/order/receive.vue')
  //     },
  //     {
  //       title: '已完成',
  //       name: 'order_complete',
  //       path: '/order_complete',
  //       component: () =>
  //         import('@/view/order/complete.vue')
  //     },
  //     {
  //       title: '已关闭',
  //       name: 'order_close',
  //       path: '/order_close',
  //       component: () =>
  //         import('@/view/order/close.vue')
  //     },
  //     {
  //       title: '维权订单',
  //       name: 'order_feedback',
  //       path: '/order_feedback',
  //       component: () =>
  //         import('@/view/order/feedback.vue')
  //     },
  //     {
  //       title: '订单详情',
  //       name: 'order_detail',
  //       path: '/order_detail',
  //       hideInMenu: true,
  //       component: () =>
  //         import('@/view/order/detail.vue')
  //     },
  //     {
  //       title: '添加订单',
  //       name: 'order_create',
  //       path: '/order_create',
  //       // hideInMenu: true,
  //       component: () =>
  //         import('@/view/order/create.vue')
  //     },
  //   ]
  // },
  {
    title: '财务',
    name: 'finance',
    path: '/finance',
    icon: 'book',
    component: Main,
    secondMenuTitle: '财务管理',
    redirect: '/finance_balance',
    child: [
      {
        title: '账单余额',
        name: 'finance_balance',
        path: '/finance_balance',
        component: () =>
          import('@/view/finance/balance.vue')
      },
      {
        title: '资金明细',
        name: 'agency_record',
        path: '/agency_record',
        component: () =>
          import('@/view/finance/agency_record.vue')
      },
      {
        title: '结算明细',
        name: 'finance_detail',
        path: '/finance_detail',
        component: () =>
          import('@/view/finance/detail.vue')
      },
      {
        title: '对账单',
        name: 'finance_bill',
        path: '/finance_bill',
        component: () =>
          import('@/view/finance/bill.vue')
      },
      {
        title: '批量生成',
        name: 'batch',
        path: '/batch',
        hideInMenu: true,
        component: () =>
          import('@/view/finance/batch.vue')
      },
    ]
  },
  {
    title: '统计',
    name: 'report',
    path: '/report',
    icon: 'chart-pie',
    component: Main,
    secondMenuTitle: '数据统计',
    redirect: '/report_summary',
    child: [
      {
        title: '数据统计',
        name: 'report_summary',
        path: '/report_summary',
        component: () =>
          import('@/view/report/summary.vue')
      },

    ]
  },
  {
    title: '设置',
    name: 'setting',
    path: '/setting',
    icon: 'cog',
    component: Main,
    secondMenuTitle: '设置',
    redirect: '/setting_account',
    child: [
      {
        title: '子账号',
        name: 'setting_account',
        path: '/setting_account',
        component: () =>
          import('@/view/setting/account.vue')
      },
      {
        title: '角色管理',
        name: 'setting_role',
        path: '/setting_role',
        component: () =>
          import('@/view/setting/role.vue')
      },
      {
        title: '修改密码',
        name: 'modify_password',
        path: '/modify_password',
        hideInMenu: true,
        component: () =>
          import('@/view/setting/modify_password.vue')
      },
    ]
  },
  {
    title: '供应商',
    name: 'company',
    path: '/company',
    icon: 'user',
    redirect: '/company/vendors',
    component: Main,
    secondMenuTitle: '商家管理',
    child: [

      {
        title: '供应商管理',
        hasGroup: true,
        child: [
          {
            title: '供应商管理',
            name: 'vendors',
            path: '/company/vendors',
            keepAlive: true,
            component: () =>
              import('@/view/vendor/index.vue')
          }

        ]
      },

    ]
  }
]
